package com.example.design.factory.version6.exercise;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class BeanpropettiesUtils {
           private   static Properties properties=new Properties();
           static {
               InputStream in=Thread.currentThread().getContextClassLoader().getResourceAsStream("com/example/design/factory/version6/exercise/bean.properties");


               try {
                   properties.load(in);
               } catch (IOException e) {
                   e.printStackTrace();
               }
           }

           public  static  String  getClassName(String key){
               return  properties.getProperty(key);
           }

    public static void main(String[] args) {
        System.out.println(getClassName("root"));
    }
}

